<template>
  <div > 
  	<div class="title">
	  		<div class="iconbox iconfont icon-aixin-copy"></div>
	  		<h3 class="flname">{{cplxName}}</h3>
	  </div>		
  	<Foodlistm :foods="foods" @addcart="addcart"></Foodlistm>
  </div>
</template>

<script >
import Foodlist from '@/components/Foodlist'
export default { 
	components:{	    	 	    	
	    	'Foodlistm':Foodlist ,  	    		    	  	    	
	   },
	props: ['foods','cplxName'],
  data () {
    return {
    	cartfoods:[],
    	totalprice:0,
     numbers:0,
     goorderzt:0,
     
    }    
  },
  methods:{ 
	  	addcart: function (cartfoods,totalprice,numbers,goorderzt){	
	  	    this.totalprice=totalprice;
	  	    this.numbers=numbers;
	  	    this.cartfoods=cartfoods;
	  	    this.goorderzt=goorderzt;
	  	    console.log(this.cartfoods);
	  	    this.$emit('addcart',this.cartfoods,this.totalprice,this.numbers,this.goorderzt);
	  	}
	}
}
</script>


<style scoped src="../assets/css/foodlist.css"></style>
